﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TvTipper.Api;
using TvTipper.Testing;

namespace TvTipper.Core
{
    public static class Services
    {
        private static IDataAccessPortal s_dbPortal;
        private static EntityManager s_entityManager;

        static Services()
        {
            //s_dbPortal = new TestDataPortal();
            s_dbPortal = new NHibernateDataAccessPortal();
            s_entityManager = new EntityManager();

            // pre load lookups
            s_entityManager.Initialize();
        }

        public static IDataAccessPortal DataAccessPortal
        {
            get { return s_dbPortal; }
        }

        public static EntityManager EntityManager
        {
            get { return s_entityManager; }
        }
    }
}
